
#ifndef __LOGGER_INTERFACE__
#define __LOGGER_INTERFACE__

#include "LogTarget.h"

namespace woe
{
	//
	//	basic logger interface
	//
	class TUTIL_API Logger
	{
	public:
		virtual ~Logger(){;}

		//
		//	singleton interface, just make it simple for most of the user who only want to simple logger object.
		//	we need to define and implement a log manager interface in the near future to support multiple logger.
		//
		static	Logger*		instance();
		static	void		instance(Logger* logger);

		//
		//	set current logger level
		//	log event that less than this level will be ignored
		//
		virtual void setLogLevel(short lvl)	= 0;

		//
		//	do log an event, and the log message will be tagged with a log level and log label
		//
		virtual void log(short lvl, short label, const string& strMsg) = 0;

		//
		//	register targets, base on log level and labels
		//	
		//
		virtual void registerTarget(LogTarget* tgt, short lvl, short label) = 0;
	private:
		static Logger*	s_LogPtr;
	};

}

#endif
